package com.adopapa.nezhacloud.register.domain;

import java.time.Instant;

import com.adopapa.nezhacloud.ddd.codegen.CodeGen;
import com.adopapa.nezhacloud.ddd.domain.BaseUuidEntity;
import com.fasterxml.jackson.annotation.JsonFormat;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import jakarta.persistence.Transient;

@Entity
@Table(name = "STUDENT_INFO")
public class StudentInfo extends BaseUuidEntity {

	private static final long serialVersionUID = -984611404867251154L;

	@CodeGen(query = "%", form = true, label = "学员姓名", required = true)
	@Column(name = "STUDENT_NAME")
	private String name;

	@CodeGen(query = "=", form = true, label = "手机号码", required = true, unique = true)
	@Column(name = "CELLPHONE")
	private String cellphone;

	@CodeGen(query = "=", form = true, label = "职业", required = true)
	@Column(name = "CAREER")
	private String career;

	@CodeGen(query = "=", form = true, label = "所在省份", required = true)
	@Column(name = "PROVINCE")
	private String province;

	@CodeGen(query = "=", form = true, label = "所在地区", required = true)
	@Column(name = "CITY")
	private String city;

	@CodeGen(query = "=", form = true, label = "所在乡镇", required = true)
	@Column(name = "TOWN")
	private String town;

	@CodeGen(form = true, label = "抖音号")
	@Column(name = "DOULIN")
	private String doulin;
	@CodeGen(form = true, label = "粉丝数")
	@Column(name = "FANS")
	private Long fans;

	@CodeGen(query = ">=", time = true, label = "开始时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS", timezone = "GMT+8")
	@Column(name = "CREATE_TIME")
	private Instant createTime;
	@Transient
	@CodeGen(query = "<", time = true, label = "结束时间")
	private Instant createTime2;
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS", timezone = "GMT+8")
	@Column(name = "UPDATE_TIME")
	private Instant updateTime;

	@Column(name = "REGISTED")
	private Boolean registed;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCellphone() {
		return cellphone;
	}

	public void setCellphone(String cellphone) {
		this.cellphone = cellphone;
	}

	public String getCareer() {
		return career;
	}

	public void setCareer(String career) {
		this.career = career;
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getTown() {
		return town;
	}

	public void setTown(String town) {
		this.town = town;
	}

	public String getDoulin() {
		return doulin;
	}

	public void setDoulin(String doulin) {
		this.doulin = doulin;
	}

	public Long getFans() {
		return fans;
	}

	public void setFans(Long fans) {
		this.fans = fans;
	}

	public Instant getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Instant createTime) {
		this.createTime = createTime;
	}

	public Instant getCreateTime2() {
		return createTime2;
	}

	public void setCreateTime2(Instant createTime2) {
		this.createTime2 = createTime2;
	}

	public Instant getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Instant updateTime) {
		this.updateTime = updateTime;
	}

	public Boolean getRegisted() {
		return registed;
	}

	public void setRegisted(Boolean registed) {
		this.registed = registed;
	}

}
